package cn.shengchao.examstar.knowledge.application.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 知识点掌握度数据传输对象
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class KnowledgePointMasteryDTO {
    
    /**
     * ID
     */
    private Long id;
    
    /**
     * 用户ID
     */
    private Long userId;
    
    /**
     * 知识点ID
     */
    private Long knowledgePointId;
    
    /**
     * 掌握程度S-精通, A-掌握, B-理解, C-初步了解
     */
    private String degreeOfMastery;
    
    /**
     * 掌握程度描述
     */
    private String degreeOfMasteryDesc;
    
    /**
     * 正确率
     */
    private String accuracyRate;
    
    /**
     * 学习计划ID
     */
    private Long studyPlanId;
    
    /**
     * 获取掌握程度描述
     */
    public String getDegreeOfMasteryDesc() {
        if (degreeOfMastery == null) {
            return "未知";
        }
        
        switch (degreeOfMastery.toUpperCase()) {
            case "S": return "精通";
            case "A": return "掌握";
            case "B": return "理解";
            case "C": return "初步了解";
            default: return "未知";
        }
    }
} 